const Router = require("koa-router");
const { useJwt } = require("../../utils/jwt");

// 创建路由对象
const router = new Router();

router.post("/", (ctx) => {
  const token = useJwt.sign(ctx.request.body);
  ctx.response.body = {
    code: 1,
    msg: "getToken",
    data: token,
  };
});

module.exports = router;
